from urllib.request import urlopen

if __name__ == '__main__':
    url = "https://www.scct.cn"

    response = urlopen(url=url)

    print(type(response))

    # 获取服务器响应代码
    print(type(response.getcode()))
    print(response.getcode())


    print(response.geturl())

    print(type(response.info()))
    print(response.info())

    print(response.getheader("Server"))
    print(response.getheader("Date"))
    print(response.getheader("Connection"))


